package cn.hairui.blog.dao;

import cn.hairui.blog.entity.Viewrecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author laoganbu
 * @since 2020-04-28
 */
@Mapper
public interface ViewrecordMapper extends BaseMapper<Viewrecord> {

    @Select("select sum(visit_count) from viewrecord where artical_id=#{id}")
    int countViewRecord(int id);
}
